/* Filename  : iocommon.h
 * 
 * Author    : Shang Wentao
 * Email     : wentaoshang@gmail.com
 * Date      : May 19, 2009
 * 
 * This file contains the ioctl function codes, 
 * and should be updated with the 'iocommon.h' 
 * in the '/user' directory at the same time. 
 * It is not part of the original Passthru NDIS
 * driver. 
 *
 */

#ifndef _IOCOMMON_H
#define _IOCOMMON_H

#define FSCTL_PTUSERIO_BASE      FILE_DEVICE_NETWORK

#define _PTUSERIO_CTL_CODE(_Function, _Method, _Access)  \
            CTL_CODE(FSCTL_PTUSERIO_BASE, _Function, _Method, _Access)

#define IOCTL_PTUSERIO_SET_MOD   \
            _PTUSERIO_CTL_CODE(0x201, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
    
#define IOCTL_PTUSERIO_GET_MOD   \
            _PTUSERIO_CTL_CODE(0x202, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
    
#define IOCTL_PTUSERIO_SET_RES   \
            _PTUSERIO_CTL_CODE(0x203, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
    
#define IOCTL_PTUSERIO_GET_RES   \
            _PTUSERIO_CTL_CODE(0x204, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)

#define IOCTL_PTUSERIO_SET_TIMEOUT   \
            _PTUSERIO_CTL_CODE(0x205, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
    
#define IOCTL_PTUSERIO_GET_TIMEOUT   \
            _PTUSERIO_CTL_CODE(0x206, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)

#define IOCTL_PTUSERIO_SET_AUTOCONFIG   \
            _PTUSERIO_CTL_CODE(0x207, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
    
#define IOCTL_PTUSERIO_UNSET_AUTOCONFIG   \
            _PTUSERIO_CTL_CODE(0x208, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)

#endif // _IOCOMMON_H

